package com.xyy.saas.payment.merchant.core.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

@Getter
@Setter
@ToString
public class QueryTransactionStatusDto {
    public static final String TRADE_TYPE_WITHDRAWAL = "WITHDRAWAL";
    public static final String TRADE_TYPE_TRANSFER = "TRANSFER";
    public static final String TRADE_TYPE_REFUND = "REFUND";
    public static final String TRADE_TYPE_PAY = "PAY";

    private String businessType;
    /**
     * 产品线
     */
    private String businessOrderType;
    /**
     * 商户ID
     */
    private String accountId;
    /**
     * 支付平台交易单号
     */
    private String transactionNo;
    /**
     * 交易时间
     */
    private Date transactionData;
    /**
     * 交易类型
     */
    private String tradeType;

    private String payNo;
    /**
     * 支付渠道
     */
    private String payChannel;

    /**
     * 构建对象
     */
    public static QueryTransactionStatusDto build(String businessOrderType, String transactionNo, String tradeType, String accountId, Date transactionData) {
        QueryTransactionStatusDto queryTransactionStatusDto = new QueryTransactionStatusDto();
        queryTransactionStatusDto.setBusinessOrderType(businessOrderType);
        queryTransactionStatusDto.setTransactionNo(transactionNo);
        queryTransactionStatusDto.setTradeType(tradeType);
        queryTransactionStatusDto.setAccountId(accountId);
        queryTransactionStatusDto.setTransactionData(transactionData);
        return queryTransactionStatusDto;
    }

    /**
     * 构建对象
     */
    public static QueryTransactionStatusDto build(String businessOrderType, String transactionNo, String tradeType, String accountId, Date transactionData, String payNo) {
        QueryTransactionStatusDto queryTransactionStatusDto = new QueryTransactionStatusDto();
        queryTransactionStatusDto.setBusinessOrderType(businessOrderType);
        queryTransactionStatusDto.setTransactionNo(transactionNo);
        queryTransactionStatusDto.setTradeType(tradeType);
        queryTransactionStatusDto.setAccountId(accountId);
        queryTransactionStatusDto.setTransactionData(transactionData);
        queryTransactionStatusDto.setPayNo(payNo);
        return queryTransactionStatusDto;
    }

    /**
     * 构建对象
     */
    public static QueryTransactionStatusDto build(String businessType, String businessOrderType, String transactionNo, String tradeType, String accountId, Date transactionData, String payNo, String payChannel) {
        QueryTransactionStatusDto queryTransactionStatusDto = new QueryTransactionStatusDto();
        queryTransactionStatusDto.setBusinessType(businessType);
        queryTransactionStatusDto.setBusinessOrderType(businessOrderType);
        queryTransactionStatusDto.setTransactionNo(transactionNo);
        queryTransactionStatusDto.setTradeType(tradeType);
        queryTransactionStatusDto.setAccountId(accountId);
        queryTransactionStatusDto.setTransactionData(transactionData);
        queryTransactionStatusDto.setPayNo(payNo);
        queryTransactionStatusDto.setPayChannel(payChannel);
        return queryTransactionStatusDto;
    }

}
